<template>
<!-- 这是设计师团队 -->
  <div id="designTeam">
    <div class="team_content">
      <div class="content_title">
        <topLogo></topLogo>
      </div>
      <div :class="['team_title', 'BeforeRefreshLeft', num ? 'AfterRefreshDelayed1': '']">
        <h4>Team<span>团队</span></h4>
      </div>
      <div class="team_imglist">
        <div class="img_content" v-for="(data, index) in imglist" :key="index" >
          <div class="img_mask" :style="{background:'url('+data.img+') center center / cover no-repeat'}"></div>
          <div class="img_zoom">
            <p>{{data.name}}<br/><span>{{data.EnglishName}}</span></p>
          </div>
        </div>
      </div>
      <div class="team_bottom">
        <div :class="['recruit', 'BeforeRefreshLeft', num ? 'AfterRefreshDelayed1': '']">
          <p>We need you<span>我们需要你</span></p>
        </div>
        <div class="team_position">
          <ul>
            <li>主创建筑师 - Architect <span>01</span></li>
            <li>主创建筑师 - Architect <span>02</span></li>
            <li>主创建筑师 - Architect <span>03</span></li>
            <li>主创建筑师 - Architect <span>04</span></li>
            <li>主创建筑师 - Architect <span>05</span></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import topLogo from "../../components/topLogo";
export default {
  data () {
    return {
      num: false, //是否添加类名
      imglist: [
        {img: 'http://47.112.6.89/public/upload/avatar/ce9a481b76c84959acb7d8d0ece52f98.jpg', name: '肖至', EnglishName: 'Felix Xiao/Chairman'},
        {img: 'http://47.112.6.89/public/upload/avatar/26b60e9a1d7cffa43a5357926d5d507e.jpg', name: '肖昕', EnglishName: 'Sean Xiao/ founding partner'},
        {img: 'http://47.112.6.89/public/upload/avatar/46600085b2ff3fe0db87808e0320d54d.jpg', name: '李志刚', EnglishName: 'LI ZHI GANG/ founding partner'},
        {img: 'http://47.112.6.89/public/upload/avatar/625bffec53cc8c74239b5f70f3be9feb.jpg', name: '梁玉宇', EnglishName: 'Jade Liang/  general manager'},
      ]
    }
  },
  components: {
    topLogo
  },
  methods: {
    // 添加动画效果
    effect() {
      this.num = true;
    },
  },
  beforeMount() {
    var _this = this;
    setTimeout(function() {
      _this.effect();  //添加动画类名
    },100)
  },
  beforeDestroy() {
    this.num = false; //去掉添加动画类名
  },
}
</script>

<style lang="less" scoped>
// #designTeam {
//   background-color: #e0e0e0;
// }
// 刷新的时候添加的动画
.BeforeRefreshLeft {
  opacity: 0;
  transition-duration: 1.5s;
  margin-left: -250px !important; //从左边出
}
// 1.7s后开始
.AfterRefreshDelayed1 {
  opacity: 1;
  transition-duration: 1.5s;
  transition-delay: 0.2s;
  margin-left: 0px !important;  //回原位
}


.team_content {
  padding: 0px 24px;
  .team_title {
    padding: 40px 0px;
    margin-top: 20px;
    color: #888;
    h4 {
      font-weight: normal;
      font-size: 20px;
      span {
        margin-left: 8px;
        color: #555;
      }
    }
  }
}

.team_imglist {
  width: 100%;
  margin-top: 40px;
  font-size: 0px;
  padding-bottom: 100px;
  .img_content {
    height: 100%;
    width: 100%;
    position: relative;
    display: inline-block;
    overflow: hidden;
  }
  .img_content::before {
    content: "";
    display: block;
    padding-bottom: 100%;
  }
  .img_mask {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    transform: scale(1);
    transition: all 0.6s ease;
  }
  .img_zoom {
    position: absolute;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.2);
    p {
      color: white;
      position: absolute;
      bottom: 30px;
      left: 30px;
      font-size: 16px;
      line-height: 22px;
    }
  }
  .img_content:hover .img_mask{
    transform: scale(1.05);
  }
}
.recruit {
  font-size: 18px;
  color: #888;
  span {
    color: #333;
    margin-left: 8px;
  }
}
.team_position {
  padding-bottom: 100px;
  ul {
    li {
      font-weight: normal;
      font-size: 18px;
      padding: 15px;
      border-bottom: 1px solid #ccc;
      margin: 30px 0px;
      color: #333;
      span {
        float: right;
      }
    }
  }
}
.content_title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 30px;
}
</style>